/*
 * Created by: Peter Weissbrod
 * Created: Saturday, November 03, 2007
 */
using Castle.ActiveRecord;

namespace Controllers
{
    /// <summary>
    /// A simple implementation of the model-view-controller design pattern
    /// </summary>
    public abstract class ControllerBase<T> where T:ActiveRecordBase
    {
        #region members
        protected IView view;
        #endregion

        #region properties
        #endregion

        #region methods
        /// <summary>
        /// enforce that no controller exists without its view
        /// </summary>
        /// <param name="view"></param>
        public ControllerBase(IView view)
        {
            this.view = view;
        }
        /// <summary>
        /// every controller must have the ability to validate its inputs
        /// </summary>
        /// <param name="t"></param>
        protected abstract void ValidateData(T t);
        #endregion
    }
}